﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security;
using System.Web;
using MVC4App.SecurityServiceReference;

namespace MVC4App.Repositories.Core.Security
{
    /// <summary>
    /// IPermissionRepository
    /// </summary>
    public interface IPermissionRepository: IRepository<PermissionDto>
    {
        /// <summary>
        /// Checks the exists in role in site.
        /// </summary>
        /// <param name="siteId">The site identifier.</param>
        /// <param name="perCode">The per code.</param>
        /// <param name="userId">The user identifier.</param>
        /// <returns></returns>
        PermissionDto CheckExistsInRoleInSite(int siteId, string perCode, int userId);

        /// <summary>
        /// Gets the list by user and site.
        /// </summary>
        /// <param name="userId">The user identifier.</param>
        /// <param name="siteId">The site identifier.</param>
        /// <returns></returns>
        IList<PermissionDto> GetListByUserAndSite(int userId,int siteId);
    }
}